package cn.lger.icollege.dao;

import cn.lger.icollege.entity.AttendanceRecord;
import org.hibernate.event.spi.SaveOrUpdateEvent;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Code that Changed the World
 * Pro said
 * Created by Pro on 2018-04-14.
 */
@Repository
public interface AttendanceRecordDao extends JpaRepository<AttendanceRecord, String> {


    List<AttendanceRecord> findByClassroomClassIdAndTeacherUsername(Long classId, String teacherUsername, Sort sort);

    List<AttendanceRecord> findByTeacherUsername(String teacherUsername);

    Integer deleteByIdAndTeacherUsername(String id,String teacherUsername);
}
